﻿namespace RFIDStation.DeviceDriver.Services.RFIDParseService;

/// <summary>
/// 标签解析器
/// </summary>
public interface IRFIDParser
{
    /// <summary>
    /// 注册标签
    /// </summary>
    /// <param name="data"></param>
    /// <returns></returns>
    Dtos.KeyValueDto Register( string data );
}


class RFIDParserOptions
{
    public string Kind { get; set; }
    public Dev.Integration.UHFReader.IApiClient UHFReaderApi { get; set; }
}


sealed class RFIDParserBuilder
{
    private readonly RFIDParserOptions _options;

    public RFIDParserBuilder( )
    {
        _options = new RFIDParserOptions( );
    }

    public RFIDParserBuilder UseOptions( Action<RFIDParserOptions> optionsAction )
    {
        optionsAction?.Invoke( _options );
        return this;
    }

    public IRFIDParser Build( )
    {
        IRFIDParser parser;

        switch ( _options.Kind )
        {
            default:
                break;
        }

        return parser;
    }
}